﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CaseReview.Model;
using CaseReview.SQLServerDAL;
using Utility;

public partial class About : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack) {
            BindData();
        }
    }

    private void BindData() {
        IList<CaseInfo> list = BusinessLogic.GetInstance().GetTotalCaseByStatus(1);
        GridView1.DataSource = list;
        GridView1.DataKeyNames = new string[]{"CaseId"};
        GridView1.DataBind();
    }
    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
      
    }
    protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        GridView1.PageIndex = e.NewPageIndex;
        BindData();
    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        IList<CaseInfo> list = BusinessLogic.GetInstance().GetTotalCaseByStatus(1);
        SendMail.SendReminderMail(list);
    }
}
